<?php
class Form {

    public static function Button($text, $plus = '', $size = 3) {
        if (is_numeric($plus)) {            
            $size = intval($plus);
            $plus = '';
        }
        echo div(button($text, $plus), $size);
    }

    public static function Text($id, $plus = '', $size = 3) {
        if (is_numeric($plus)) {            
            $size = intval($plus);
            $plus = '';
        }
        echo div(text($id, $plus), $size);
    }

    public static function Radio($grupo, $texto,  $plus = '', $size = 3) {
        if (is_numeric($plus)) {            
            $size = intval($plus);
            $plus = '';
        }
        echo div(radio('', $texto, $grupo, $plus), $size);
    }

    public static function Check($id, $text, $plus, $size=3) {
        if (is_numeric($plus)) {            
            $size = intval($plus);
            $plus = '';
        }
        echo div(check($id, $text, $plus), $size);
    }

    public static function Combo($id, $names, $ids = array(), $plus = '', $size = 3) {
        if (is_numeric($plus)) {            
            $size = intval($plus);
            $plus = '';
        }
        if ($ids == '' || $ids == null || $ids == array()) {
            $ids = $names;
        }
        echo div(combo($id, $ids, $names, $plus), $size);
    }

    public static function Label($text, $size = 2) {
        echo div(label($text), $size);
    }

    public static function Mask($id, $mask = '9999', $plus = '', $size = 3) {
        if (is_numeric($plus)) {            
            $size = intval($plus);
            $plus = '';
        }
        echo div(mask($id, $mask, $plus), $size);
    }

    public static function Date($id, $plus = '', $size = 3) {
        if (is_numeric($plus)) {            
            $size = intval($plus);
            $plus = '';
        }
        echo div(date_form($id, $plus), $size);
    }

    public static function Number($id, $plus = '', $size = 3) {
        if (is_numeric($plus)) {            
            $size = intval($plus);
            $plus = '';
        }
        echo div(number($id, $plus), $size);
    }

    public static function Money($id, $plus = '', $size = 3) {
        if (is_numeric($plus)) {            
            $size = intval($plus);
            $plus = '';
        }
        echo div(money($id, $plus), $size);
    }

    public static function Password($id, $plus = '', $size = 3) {
        if (is_numeric($plus)) {            
            $size = intval($plus);
            $plus = '';
        }
        echo div(password($id, $plus), $size);
    }

    public static function File($id, $plus = '', $size = 3) {
        if (is_numeric($plus)) {            
            $size = intval($plus);
            $plus = '';
        }
        echo div(file_form($id, $plus), $size);
    }

}
